package org.example.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.example.entity.DTO.RecordDto;
import org.example.entity.VisitorRecords;

import java.util.List;

/**
* @author 12845
* @description 针对表【visitor_records】的数据库操作Mapper
* @createDate 2024-01-10 15:35:51
* @Entity generator.domain.VisitorRecords
*/
@Mapper
public interface VisitorRecordsMapper extends BaseMapper<VisitorRecords> {

    @Select(" select date_format(access_time, '%Y-%m-%d') access_time, count(*) count from visitor_records group by date_format(access_time, '%Y-%m-%d') order by access_time;")
    List<RecordDto> getRecord();
}




